home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / dosutils / batkit57.zip / BATDEMO.BAT < prev    next >
DOS Batch File  |  1996-05-08  |  4KB  |  145 lines

  1. echo off
  2. SAVEDIR
  3. if errorlevel 4 goto SDERR
  4. if errorlevel 3 goto OLDOS
  5. if errorlevel 1 goto ENVERR
  6. set
  7. wait 000002
  8. SET TEST=To_determine_whether_there_is_enough_space.
  9. IF not "%TEST%"=="To_determine_whether_there_is_enough_space." goto ENVERR
  10. SET TEST=
  11. SET BDIR=%LDIR%
  12. :: If BatKit is in a ROOT, set BDIR to strip "\" from end.
  13. if %LDIR%==%LDRV%\ SET BDIR=%LDRV%
  14. :MENU
  15. %BDIR%\SAVEDIR %BDIR%
  16. %BDIR%\GetKey /K"12345DPHLX-"/F"%BDIR%\MENU.GKF"/E
  17. if errorlevel 88 goto STOP
  18. if errorlevel 80 goto PRINT
  19. if errorlevel 76 goto LIST
  20. if errorlevel 72 goto HELP
  21. if errorlevel 68 goto SUBMEN
  22. if errorlevel 53 goto BIGMENU
  23. if errorlevel 52 goto MAKESCRN
  24. if errorlevel 51 goto COLOTONE
  25. if errorlevel 50 goto WP
  26. if errorlevel 49 goto DEMO
  27. goto QUIT
  28. :COLOTONE
  29. :: For DOSs before 3.1 pre-set the environment variable by using the next line
  30. :: SET GK=This is here to save plenty of room for the GK variable
  31. %BDIR%\GetKey /M"#&22@C"/N/W0
  32. :: For DOSs after 3.0 use the /e syntax to expand the environment of the shell
  33. COMMAND /e:2000 /C COLOTONE
  34. goto MENU
  35. :DEMO
  36. %BDIR%\GetKey /F"DEMO.GKF"/n
  37. Goto MENU
  38. :BIGMENU
  39. GETKEY /S/K"123456789-X"/4/F"ASMENU.GKF"
  40. :TEST
  41. IF ERRORLEVEL 88 GOTO MENU
  42. IF ERRORLEVEL 57 GETKEY /W0/M"@S9"
  43. IF ERRORLEVEL 56 GETKEY /W0/M"@S8"
  44. IF ERRORLEVEL 55 GETKEY /W0/M"@S7"
  45. IF ERRORLEVEL 54 GETKEY /W0/M"@S6"
  46. IF ERRORLEVEL 53 GETKEY /W0/M"@S5"
  47. IF ERRORLEVEL 52 GETKEY /W0/M"@S4"
  48. IF ERRORLEVEL 51 GETKEY /W0/M"@S3"
  49. IF ERRORLEVEL 50 GETKEY /W0/M"@S2"
  50. IF ERRORLEVEL 49 GETKEY /W0/M"@S1"
  51. IF ERRORLEVEL 45 GETKEY /W0/M"@S255"
  52. GETKEY /K"123456789-X"/M"@X65@Y21"
  53. GOTO TEST
  54. :MAKESCRN
  55. GetKey /w0/f"msdemo.gkf"/s/n
  56. goto MENU
  57. :PRINT
  58. COPY %BDIR%\BATKIT.DOC PRN
  59. goto MENU
  60. :LIST
  61. GetKey /k"yn"/m"@T    Do you have a text file viewer called LIST? "
  62. if errorlevel 89 goto HAVELIST
  63. GetKey /f"menu.gkf@l"
  64. type %BDIR%\BATKIT.DOC | more
  65. goto MENU
  66. :HAVELIST
  67. LIST %BDIR%\BATKIT.DOC 
  68. goto MENU
  69. :HELP
  70. GetKey /h
  71. GetKey /w30/m"@X65#&1FPress any key"/n/s
  72. goto MENU
  73. :SUBMEN
  74. %BDIR%\SAVEDIR
  75. %BDIR%\GetKey /K"XLGFDC-"/F"%BDIR%\MENU.GKF@S"/E/A/Z
  76. if errorlevel 88 goto MENU
  77. if errorlevel 76 goto LSTFILE
  78. if errorlevel 71 goto CHGDIR
  79. if errorlevel 70 goto FORMAT
  80. if errorlevel 68 goto DELETE
  81. if errorlevel 67 goto COPY
  82. goto MENU
  83. :CHGDIR
  84. %BDIR%\GetKey /L21/G/V"NPATH"/M"@X51@Y6#&0E@DT@X16@Y20Enter the NEW drive and path: @T&05#&700"
  85. if %NPATH%! == ! goto SUBMEN
  86. %BDIR%\SAVEDIR %NPATH%
  87. set NPATH=
  88. goto SUBMEN
  89. :LSTFILE
  90. %BDIR%\GetKey /w0/m"@O@C"
  91. dir/p
  92. %BDIR%\WAIT /c 00:00:30
  93. goto SUBMEN
  94. :DELETE
  95. %BDIR%\GetKey /L8/G/N"*"/KF"%BDIR%\GetKey.RSP"/M"@X20@Y20Enter password: (Hint - try Password) @F"
  96. %BDIR%\GetKey /Z/L12/g/v"DFILE"/f"%BDIR%\MENU.GKF@D"
  97. if %DFILE%! == X! goto SUBMEN
  98. echo -
  99. echo -
  100. dir %DFILE%
  101. %BDIR%\GetKey /m"══  Press Y to delete %LDIR%\%DFILE%: "/n/s
  102. if errorlevel 90 goto SUBMEN
  103. if errorlevel 89 DEL %DFILE%
  104. %BDIR%\WAIT /c 00:00:30
  105. goto SUBMEN
  106. :COPY
  107. getkey /w10/m"@H@T        #&1E  This is just a #&9Esample#&1E menu selection; it is not functional. @CR-@O"/n
  108. goto SUBMEN
  109. :FORMAT
  110. %BDIR%\GetKey /v/k"abx"/m"@X51@Y6#&0E@DT@X20@Y20Diskette drive to format (or X to eXit): "
  111. if errorlevel 88 goto SUBMEN
  112. cls
  113. format %GK%:
  114. goto SUBMEN
  115. :WP
  116. getkey /w10/m"@H@T    #&1E  This is just a #&9Esample#&1E menu selection; it is not functional."/n
  117. goto MENU
  118. :STOP
  119. %BDIR%\GetKey /f"%BDIR%\menu.gkf@x"/N/s
  120. if errorlevel 78 goto PARK
  121. if errorlevel 77 goto MENU
  122. :PARK
  123. %BDIR%\SAVEDIR %BDIR%
  124. SET BDIR=
  125. SET LDIR=
  126. SET LDRV=
  127. SET GK=
  128. SET DFILE=
  129. CLS
  130. goto QUIT
  131. :OLDOS
  132. getkey /w0/z/m"@T       #&CABatKit requires MS or PC-DOS 2.x or above to run!"
  133. wait /c 000030
  134. goto QUIT
  135. :ENVERR
  136. getkey /w0/z/m"@T   #&CAYou don't have enough free environment space for BatDemo!  See README.1ST."
  137. wait /c 000030
  138. goto QUIT
  139. :SDERR
  140. echo SaveDir execution error
  141. echo  
  142. SaveDir ?
  143. wait /c
  144. :QUIT
  145.